<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQueryHistoriesTable extends Migration
{
    /**
     * 历史价格查询历史
     *
     * @return void
     */
    public function up()
    {
        Schema::create('query_histories', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('user_id');
            $table->string('sku');
            $table->tinyInteger('platform')->comment('1：淘宝，2：京东');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('query_histories');
    }
}
